package inno.data;
import java.util.ArrayList;


public class StockFullData {

	String stockName;
	ArrayList<Long> date;
	ArrayList<Double> openPrice;
	ArrayList<Double> highPrice;
	ArrayList<Double> lowPrice;
	ArrayList<Double> closingPrice;
	ArrayList<Long> volume;
	
	public StockFullData(String name){
		stockName = new String(name);
		date = new ArrayList<Long>();
		openPrice = new ArrayList<Double>();
		highPrice = new ArrayList<Double>();
		lowPrice = new ArrayList<Double>();
		closingPrice = new ArrayList<Double>();
		volume = new ArrayList<Long>();
	}
	
	public void addDayData(Long date, Double openPrice, Double highPrice, Double lowPrice,
			Double closingPrice, Long volume){
		this.date.add(new Long(date));
		this.openPrice.add(new Double(openPrice));
		this.highPrice.add(new Double(highPrice));
		this.lowPrice.add(new Double(lowPrice));
		this.closingPrice.add(new Double(closingPrice));
		this.volume.add(new Long(volume));
	}

	public String getStockName() {
		return stockName;
	}

	public Long getDate(int day) {
		return date.get(day);
	}

	public Double getOpenPrice(int day) {
		return openPrice.get(day);
	}

	public Double getHighPrice(int day) {
		return highPrice.get(day);
	}

	public Double getLowPrice(int day) {
		return lowPrice.get(day);
	}

	public Double getClosingPrice(int day) {
		return closingPrice.get(day);
	}
	
	public Double getLastClosingPrice(){
		return closingPrice.get(closingPrice.size()-1);
	}
	
	public ArrayList<Double> getAllClosingPrice(){
		return closingPrice;
	}

	public Long getVolume(int day) {
		return volume.get(day);
	}
	
	public int getDaysSum(){
		return closingPrice.size();
	}
	
}
